var JsonServiceClient = AjaxStack.JsonServiceClient;
var errorHandler = function(e) { alert("service error: " + e); }

YAHOO.namespace("ajaxstack");
YAHOO.ajaxstack.JsonServiceClientTests = new YAHOO.tool.TestCase({

	name: "JsonServiceClient Tests",

	//--------------------------------------------- 
	// Setup and tear down 
	//---------------------------------------------

	setUp: function()
	{
	},

	tearDown: function()
	{
	},

	//--------------------------------------------- 
	// Tests 
	//---------------------------------------------

	testCallSearchIndex: function()
	{
		var client = new JsonServiceClient(
				"http://localhost/DigitalDistribution.SearchIndex.Host.WebService/");

		client.getFromJsonService("SearchTracks", { Query: "nirvana" }, function(r)
		{
			alert(r);
			$.dump(r);
		}, errorHandler);

		//Assert.areEqual('1979-05-09T00:00:00Z', Dto.toUtcDate(date));
	}

});

